/**
 * 
 */
package com.dy.agent.agent.api.web.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dy.agent.agent.api.biz.AgentAnchorBiz;
import com.dy.agent.agent.api.service.AgentAnchorStatisticsService;
import com.dy.agent.agent.api.service.AgentDailyViewService;
import com.dy.agent.agent.api.web.controller.utils.ControllerUtils;
import com.dy.agent.agent.api.web.controller.utils.ResultUtils;
import com.dy.agent.agent.api.web.controller.vo.ResultWrapper;

/**
 * @author leiruiqi
 *
 */
@RestController
@RequestMapping("/agentAnchorTask")
public class AgentAnchorTaskController {
	@Resource
	private AgentDailyViewService agentDailyViewService;

	@Resource
	public AgentAnchorStatisticsService agentAnchorStatisticsService;

	@Resource
	private AgentAnchorBiz agentAnchorBiz;

	@RequestMapping("/buildCurrentAgentView")
	public ResultWrapper<?> buildCurrentAgentView(final String viewDt) {

		return ControllerUtils.doHandler(new ControllerUtils.ActionHandler() {

			@Override
			public ResultWrapper<?> getResponse() {

				agentAnchorBiz.buildCurrentAgentView(viewDt);
				return ResultUtils.asSuccess();
			}

		}, "AgentAnchorTaskController.buildCurrentAgentView");
	}

}
